package com.blb.service.impl;

import com.blb.entity.Laser;
import com.blb.entity.Order;
import com.blb.entity.Printer;
import com.blb.mapper.LaserMapper;
import com.blb.service.ILaserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-14
 */
 @Service
public class LaserServiceImpl extends ServiceImpl<LaserMapper, Laser> implements ILaserService {

    @Resource
    private LaserMapper laserMapper;

     @Override
     public List<Order> findbyorderId( int start,int length,String orderId,String companyId) {
          return laserMapper.findbyorderid(start, length,orderId,companyId);
    }

    @Override
    public int count(String orderId,String companyId) {
        return laserMapper.count(orderId,companyId);
    }

    @Override
    public List<Laser> findbylon(int start, int length, String lNo ,String companyId) {
        return laserMapper.findcode(start, length, lNo,companyId);
    }

    @Override
    public int count1(String lNo,String companyId) {
        return laserMapper.count1(lNo,companyId);
    }

    @Override
    public List<Laser> findfp(int start, int length, String nocode,String companyId) {
        return laserMapper.findfp(start, length, nocode,companyId);
    }

    @Override
    public int count2(String nocode,String companyId) {
        return laserMapper.count2(nocode,companyId);
    }

    @Override
    public void delete(String id) {
        laserMapper.delete(id);
    }

    @Override
    public int findnumbyid(String id) {
        System.out.println(id);
        return  laserMapper.findnumbyid(id);
    }

    @Override
    public void addlaser(Laser laser) {
           laserMapper.addlaser(laser);
    }

    @Override
    public String findnobyid(String id) {
        return laserMapper.findnobyid(id);
    }

    @Override
    public List<Printer> findallprinter(int start, int length) {
        return laserMapper.findallprinter(start,length);
    }

    @Override
    public int count3() {
        return laserMapper.count3();
    }

    @Override
    public List<Laser> findbyid(int start, int length, List<String> ids) {
        return laserMapper.findbyid(start,length,ids);
    }

    @Override
    public int count4(List<String> ids1) {
        return laserMapper.count4(ids1);
    }

    @Override
    public String findnumbyno(String lno) {
        return laserMapper.findnum(lno);
    }

     @Override
    public void updatebyno(String num,String lserial,String lno) {
        laserMapper.updatebyno(num,lserial,lno);
    }

    @Override
    public Laser findByCode(String lCode, String companyid) {
        return laserMapper.findByCode(lCode,companyid);
    }

    @Override
    public void updateStatus(List<String> ids) {
             laserMapper.updateStatus(ids);
    }

}
